package com.baidu.travel.controller;

import com.baidu.travel.domain.Summary;
import com.baidu.travel.service.SummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/summary")
public class SummaryController {
    @Autowired
    private SummaryService summaryService;

    /**
     * 查询报表记录数
     */
    @RequestMapping("/findSummary")
    @ResponseBody
    public List<Summary> findAll()  {
        List<Summary> summaryList=summaryService.summary();
        return summaryList;
    }
}
